<h2>Query</h2>
<form id="form1" name="form1" method="post" action="">
    <div style="width:550px;margin:auto">
        <table width="100%" border="0" cellspacing="2" cellpadding="2">
            <tr>
                <td colspan="2"><h4>Query</h4></td>
            </tr>
            <tr>
                <td colspan="2">
                    <textarea name="query" id="query"  style="width:520;height:250px"></textarea>
                </td>
            </tr>
            <tr>
                <td width="42%"><input type="hidden" value="query" name="MM_insert" /></td>
                <td width="58%">
                    <input type="submit" name="button" id="button" value="Run Query" />
                </td>
            </tr>
        </table>
    </div>
</form>
<div class="ermsg" style="padding:5px;margin:5px;text-align: center;background: #FCF0F0">
    <div style="font-size: 80%;color: #666">
        <?php if (isset($_POST["query"])) {
            echo $_POST["query"]; //$query;  ?>
        </div>
        <h3><?php echo $query_result . " "; ?></h3>


<?php
echo $table;
} ?>
</div>


